package com.lanchetech.im.service;


import com.alibaba.fastjson.JSONObject;
import com.lanchetech.im.config.WebSocketServer;
import org.yeauty.pojo.Session;

import java.io.IOException;
import java.util.concurrent.ConcurrentHashMap;

public interface ImService {
    void imRouter(Long userId, String eventType, ConcurrentHashMap<Long, WebSocketServer> map, Session session);

    void messageRouter(Long userId, String message, ConcurrentHashMap<Long, WebSocketServer> map, Session session);

    void userLogin(Long userId, Session session) throws IOException;

    void login(Long userId, Session session) throws IOException;

    void read(Long userId, JSONObject obj, ConcurrentHashMap<Long, WebSocketServer> map) throws IOException;

    void getChatHistory(Long userId, int pageNo, Session session) throws IOException;

    void getChatPage(Long userId, JSONObject obj, ConcurrentHashMap<Long, WebSocketServer> map) throws IOException;

    void sendMessageToFriend(Long userId, JSONObject obj, ConcurrentHashMap<Long, WebSocketServer> map) throws IOException;

    boolean onUserLoginVerify(String token);

    Long getUserId(String token);
}